#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>

int my_strlen(char* str)
{
    int count = 0;
    while (*str != '\0')
    {
        count++;
        str++;
    }
    return count;
}

void reverse_string(char* str)
{
    int len = 0;
    int i = 0;
    for(i=0;str[i]!='\0';i++)
        len++;
    char tmp = *str;
    *str = str[len - 1];
    str[len - 1] = '\0';
    if (my_strlen(str + 1) >= 2)
        reverse_string(str + 1);
    str[len - 1] = tmp;
}



int main(void)
{
	char str[] = "abcdef";
	int count = 0;
	int i = 0;
	 reverse_string(str);
	 printf("%s", str);
	return 0;
}